package com.lanzchina.lanclass.controller;

import com.lanzchina.lanclass.domain.Result;
import com.lanzchina.lanclass.service.SchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SchoolController {

    @Autowired
    private SchoolService schoolService;

    @PostMapping("/getAllSchool")
    public Result findAllSchools(String validateCode) {
        return schoolService.findAllSchool(validateCode);
    }

    @PostMapping("/getSchoolBySchoolCode")
    public Result findSchool(Integer schoolCode, String validateCode) {
        return schoolService.findSchool(schoolCode, validateCode);
    }
}
